home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / PROGRAMM / VISUAL_B / H441.ZIP / VXBTEST.ZIP / VYFORM0.FRM (.txt) < prev    next >
Visual Basic Form  |  1992-12-03  |  4KB  |  119 lines

  1. VYFORM0
  2. Set Relations Example
  3. Form1%
  4. ButtonQuit
  5. &Quit
  6. ButtonNext
  7. &Next
  8. Catname
  9. Aname
  10. Bcode
  11. Label7
  12. )matically extracted from the child files.
  13. Label6
  14. BAs we skip through the airbuyer file, related data items are auto-
  15. Label5
  16.  Make and Model from Airtypes.dbf
  17. Label3
  18. Category
  19. Label4
  20. $Customer name from Child Aircust.dbf
  21. Label2
  22. Customer Code
  23. Label1
  24. Parent File Airbuyer.dbf
  25. MS Sans Serif
  26. ButtonNext_Click
  27. vxSkip
  28. FALSE
  29. vxEof
  30.     vxDeleted
  31. CatBox
  32. CatNameBox
  33. Form8Display
  34. Form_Click
  35. @    Form_Load
  36. AircustDbf|
  37. vxUseDbf+
  38. Aircust1Ntx
  39. vxUseNtx:
  40. AirtypesDbfI
  41. AirtypesNtx
  42. AirbuyerDbf
  43. Airbuy1Ntx
  44. vxTop*
  45. vxSetAlias
  46. vxSetRelation
  47. ErrCode
  48. VYFORM0
  49. VYForm0Display
  50. VYForom0Display>
  51. vxRecord
  52. Category
  53. Catname
  54. vxEvalLogical
  55. EvalBox
  56. EvStr
  57. vxEvalStringn
  58. JoinBox
  59. BcodeQ
  60. vxField
  61. Aname
  62. ButtonQuit_Click
  63. Form_Paint
  64. vxSelectDbf
  65. vxFormFrame
  66. VXFORM8
  67. vxCtlStyle
  68.     VX_RECESS
  69. Form_Unload
  70. Cancel
  71. vxCloseAll
  72. vxWindowDereg
  73. ButtonNext_Click
  74.  skip forward one record
  75.  if skip error, only allow exit-
  76. Error on Skip Next. Try Reindex.
  77.  test for end of file 
  78. End of File!
  79. ButtonQuit_Click
  80. Form_Load
  81.  vxSetRelations Examplem
  82.  We will skip through the Airbuyer filef
  83.  which has a many to one relationship with
  84.  both the aircust.dbf file and the airtypes.dbf.
  85.  file.
  86.  open child files firsti
  87. \vb\vxbtest\aircust.dbf
  88. \vb\vxbtest\aircust1.ntx
  89.  put something in record buffer
  90. \vb\vxbtest\airtypes.dbf
  91. \vb\vxbtest\airtypes.ntx
  92.  open parent file (has many records)
  93. \vb\vxbtest\airbuyer.dbf
  94. \vb\vxbtest\airbuy1.ntx
  95.  define alias names so we can use fieldi
  96.  qualifiers when extracting data
  97. buyer
  98. customer
  99.  define relationship to current selectionb
  100.  the 1st param defines the file we setting
  101.  up the relationship to (the child file)
  102.  and the second param tells vxbase how tow
  103.  construct a key to be used on the current
  104.  index in use on the child filef
  105. b_code
  106. 1st relation failed
  107. b_cat
  108. 2nd relation failed
  109.  now when we issue vxTop(), the two relateds
  110.  file pointers will move to match the values
  111.  in the parent file key fields
  112. Form_Paint
  113. Form_Unload
  114. VYForm0Display
  115. buyer.b_code
  116. buyer.b_cat
  117. customer.a_name
  118. type.catname
  119.